#!/bin/sh
OUTPUT=../../../wiki/EscenGallery.wiki
OUTPUTDIR=../../../wiki/gallery/

# reset the file
echo "#summary Gallery of the example directory" > $OUTPUT
echo "#labels Featured" >> $OUTPUT
echo "=Gallery=" >> $OUTPUT
for i in `ls ../../examples/*.escen`; do
	echo "==`basename $i`==" >> $OUTPUT
	echo "[http://enesim.googlecode.com/svn/wiki/gallery/`basename $i | sed 's/escen/png/'`]" >> $OUTPUT
	echo "{{{" >> $OUTPUT
	cat $i >> $OUTPUT
	echo "}}}" >> $OUTPUT
	../benchmark/benchmark -d -i ../../examples/data -f $i -o $OUTPUTDIR >/dev/null
done


